<template>
  <div id="paySuccess">
    <div class="topBox">
      <img
        src="https://tsyx-rights-and-interests.oss-cn-hangzhou.aliyuncs.com/img/pay.png"
        alt=""
      />
      <h3>支付成功</h3>
      <!-- <span>恭喜您成为中石油权益会员</span> -->

      <p>
        您有&nbsp;&nbsp;<span class="red">1张</span
        >&nbsp;&nbsp;卡券发送到&nbsp;&nbsp;<span class="red">首页</span
        >&nbsp;&nbsp;
      </p>

      <div class="quan">
        <div class="leftBox">
          <span>￥</span>
          <h3 class="money">20</h3>
          <p>优惠券</p>
        </div>
        <div class="midBox">
          <h4>中石油格桑券电子券</h4>
          <p>满50元可用</p>
          <div>有效使期：30天</div>
        </div>
        <div class="rightBox">
          <div class="bottomToMsgQuan">扫码使用</div>
        </div>
      </div>

      <div class="nowUse" @click="toindexCard">立即使用</div>
    </div>

    <!-- <div class="nowUse" @click="torenzheng">一键领取所有的汽油券</div> -->
    <div class="back" @click="backIndexButton">回首页></div>
  </div>
</template>

<script>
export default {
  data() {
    return {};
  },
  created() {},
  methods: {
    //   回首页
    backIndexButton() {
      this.$router.push({ name: "index" });
    },
    // 立即使用
    toindexCard(){
      this.$store.state.indexCardStatus = 4
        this.$router.push({
        name: "indexCard",
        params: { id: 4 },
      });
    },
    // 去认证
    torenzheng(){
        this.$router.push({ name: "upload" });
    }
  },
};
</script>

<style lang='scss' scoped>
.topBox {
  position: relative;
  width: 95%;
  background-image: url(https://tsyx-rights-and-interests.oss-cn-hangzhou.aliyuncs.com/background/payokBg.png);
  background-repeat: no-repeat;
  background-size: 100%;
  text-align: center;
  padding-top: 1rem;
  box-sizing: border-box;
  margin: 1rem auto;
  img {
    width: 30%;
  }
  h3 {
    font-size: 0.4rem;
    margin: 0.2rem 0 2rem 0;
    padding: 0;
  }
  span {
    font-size: 0.4rem;
    color: #999;
  }
  p {
    margin-top: 0.8rem;
    font-size: 0.35rem;
    .red {
      color: #c41e34;
      font-weight: 700;
    }
  }
  .quan {
    position: relative;
    width: 90%;
    height: 3rem;
    margin: 0.2rem auto;
    background-color: #f7f7f7;
    border-radius: 5%;
    .leftBox {
      float: left;
      width: 25%;
      height: 3rem;
      text-align: center;
      padding-top: 0.8rem;
      box-sizing: border-box;
      color: #dc4433;
      .money {
        display: inline-block;
        margin: 0;
        padding: 0;
        font-size: 0.6rem;
      }
      p {
        margin: 0.1rem 0;
        padding: 0;
      }
    }
    .midBox {
      float: left;
      height: 3rem;
      width: 50%;
      text-align: left;
      padding-left: 0.4rem;
      box-sizing: border-box;
      h4 {
        margin: 0.7rem 0 0.1rem 0;
        font-size: 0.4rem;
      }
      p {
        margin: 0 0 0.1rem 0;
        font-size: 0.35rem;
        color: #dc4433;
      }
      div {
        color: #999;
        font-size: 10px;
      }
    }
    .rightBox {
      position: relative;
      float: left;
      width: 25%;
      height: 3rem;
      .bottomToMsgQuan {
        position: absolute;
        width: 60%;
        left: 50%;
        top: 50%;
        transform: translateX(-50%) translateY(-50%);
        padding: 0.3rem 0.2rem;
        background: linear-gradient(111deg, #cd2136 5%, #9e1129 88%);
        border-radius: 0.25rem;
        color: #feffff;
        text-align: center;
      }
    }
  }
}
.nowUse {
  width: 90%;
  margin: auto;
  padding: 0.3rem 0;
  box-sizing: border-box;
  border: 1px solid #c41e33;
  color: #c41e34;
  border-radius: 0.7rem;
  font-weight: 700;
  font-size: 0.4rem;
  margin-top: 0.5rem;
  text-align: center;
}

.back {
  text-align: center;
  color: #ccc;
  margin-top: .4rem;
}
</style>